package handler

import (
	"github.com/gin-gonic/gin"
	"log"
)

type errorMessage struct {
  Message string `json:"message"`
}

func newErrorResponse(c *gin.Context, statusCode int, message string) {
    log.Fatalf("Error: %s", message)
    c.JSON(statusCode, errorMessage{ message })
}
